<template>
  <div class="shujixq">
    <div class="booktop">
      <div class="top">
        <div class="top1">
          <div class="imgs" @click="toshuj()">
            <img src="../../assets/images/logon.png" alt="" />
          </div>
          <div class="lefts">
            <div></div>
            <div class="lefts1">浙江省非物质文化<br />数字文献中心</div>
            <div class="lefts2">
              ZhejiangProvinceIntangibleCultureDigitalLiteratureCenter
            </div>
          </div>
          <div class="rights">
            <div></div>
            <usertbtn></usertbtn>
            <div class="ris3">
              <el-form
                :inline="true"
                :model="formInline"
                class="demo-form-inline"
                style="width: 100%; display: flex; height: 56px"
              >
                <el-form-item
                  style="width: 382px; height: 56px; margin-bottom: 0"
                >
                  <el-input
                    v-model="formInline.user"
                    placeholder="输入关键词搜索"
                    style="width: 382px; height: 56px"
                  >
                    <img
                      slot="append"
                      src="../../assets/images/sousuo.png"
                      alt=""
                    />
                  </el-input>
                  <!-- <el-input placeholder="输入关键词搜索" v-model="formInline.user" class="input-with-select">
                        <el-button slot="append" icon="el-icon-search" @click="sousuos()"></el-button>
                        </el-input> -->
                </el-form-item>
                <el-form-item>
                  <div
                    style="padding-left: 20px; margin-top: 7px; cursor: pointer"
                    @click="onSubmit()"
                  >
                    <div
                      style="
                        display: flex;
                        align-items: center;
                        height: 100%;
                        font-size: 18px;
                        font-family: Source Han Sans CN-Regular,
                          Source Han Sans CN;
                        font-weight: 400;
                        color: #911f23;
                      "
                    >
                      高级检索
                      <i
                        style="font-size: 18px; font-weight: 550"
                        class="el-icon-arrow-right"
                      ></i>
                    </div>
                  </div>
                </el-form-item>
              </el-form>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    
    <div class="booktop1" v-if="id == 30">
        <div class="book1">
            <div class="wj">
                <span>标  题：</span>
                {{pcxqlist.wjmc}}
            </div>
            <div class="wj1">
                <div class="wj12">
                    <span>级  别：</span>
                    {{pcxqlist.wjjbname}}
                </div>
                <div class="wj12">
                    <span>类  别：</span>
                    {{pcxqlist.wjlbname}}
                </div>
            </div>
            <div class="wj2">
                <div class="wj12">
                    <span>发文时间：</span>
                    {{pcxqlist.wjfwsj}}
                </div>
                <div class="wj12">
                    <span>发文机关：</span>
                    {{pcxqlist.wjfwjg}}
                </div>
            </div>
            <div class="wj" style="padding-top:16px">
                <span>文  号：</span>
                {{pcxqlist.wjdocid}}
            </div>
            
        </div>
        <div class="neirong">
            {{pcxqlist.wjmc}}
        </div>
        <div class="neirong1">
        </div>
        <!-- <div class="neirong2">
            <div class="wj">
                <span>发文时间：</span>
                 {{pcxqlist.wjfwsj}}
            </div>
            
            <div class="wj">
                <i class="el-icon-folder" style="font-size:16px"></i>
                <span style="padding-left:5px">下载</span>
               
            </div>
        </div> -->
        <div class="book2">
           <div class="book21">
                <div class="book22" v-html="pcxqlist.wjqw">

                </div>
           </div>
        </div>
        <div class="neirong1">
        </div>
        <div class="fujian">
            <div class="fs1">
                附件
            </div>
            <div class="fs2">
               <span @click="xzfj(item.fileurl)" v-for="(item,index) in fujianLists" :key="index">{{item.dataname}}</span>
            </div>
        </div>
    </div>
    <div style="width:100%;height:100px;background-color: #fff;"></div>
    <footbtn class="foot"></footbtn>
  </div>
</template>
<style scoped  lang="scss">
::v-deep .el-input {
  display: flex;
  justify-content: center;
  color: #333333;
}
::v-deep .el-input--prefix .el-input__inner {
  width: 305px;
  border: 0px;
}
//搜索框
::v-deep .el-input-group > .el-input__inner {
  height: 56px;
  border: 0px;
}
::v-deep .el-input-group__append {
  border: none !important;
  background-color: #fff;
  padding: 0 45px 0 10px;
}
::v-deep .el-input-group__append img {
  width: 32px;
  height: 32px;
  padding-top: 12px;
  cursor: pointer;
}
::v-deep .el-button--primary {
  background-color: #911f23;
  border-color: #911f23;
  border-radius: 8px;
  height: 56px;
  width: 112px;
  margin-left: 16px;
}
::v-deep .el-form--inline .el-form-item {
  margin-right: 0;
}

.shujixq {
  width: 100%;
  background-color: #f7f7f8;
  .booktop {
    width: 100%;
    height: 200px;
    background: url("../../assets/images/booktop.png") no-repeat;
    background-size: 100% 100%;
    .top {
      width: 1400px;
      height: 176px;
      margin: 0 auto;
      // background-color: #F7F7F8;
      .top1 {
        position: relative;
        width: calc(100% - 0px);
        margin: 0 auto;
        height: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        // background-color: pink;
        .imgs {
          position: absolute;
          top: 0;
          width: 138px;
          height: 176px;
          z-index: 100;
          img {
            width: 100%;
            height: 100%;
          }
        }
        .lefts {
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          height: 100%;
          margin-left: 170px;
          .lefts1 {
            font-size: 24px;
            font-family: Source Han Sans CN-Regular, Source Han Sans CN;
            font-weight: 400;
            color: #333333;
            // line-height: 35px;
          }
          .lefts2 {
            font-size: 14px;
            font-family: Source Han Sans CN-Regular, Source Han Sans CN;
            font-weight: 400;
            color: #666666;
          }
        }
        .rights {
          position: relative;
          display: flex;
          flex-direction: column;
          align-items: flex-end;
          justify-content: space-between;
          // padding-bottom: 40px;
          height: 100%;

          .ris3 {
            // width: 362px;
            // margin-top: 37px;
          }
          .ri {
            padding-right: 30px;
          }
          .ri1 {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 68px;
            height: 38px;
            background: #911f23;
            border-radius: 8px 8px 8px 8px;
            opacity: 1;
            color: #fff;
            cursor: pointer;
          }
        }
      }
    }
  }
  .booktop1 {
    width: 100%;
    background-color: #fff;
    padding: 32px 0;
   
    .book1 {
      width: calc(1200px - 48px);
      margin: 0px auto;
      border-radius: 8px 8px 8px 8px;
      opacity: 1;
      padding: 20px;
      border: 1px solid #d8d8d8;
      .wj{
        width: 100%;
        font-size: 14px;
        color: #666;
        span{
            font-size: 16px ;
            color: #333333;
        }
      }
      .wj1{
        width: 100%;
        padding-top: 16px;
        display: flex;
        .wj12{
            width: 50%;
            font-size: 14px;
            color: #666;
            span{
                font-size: 16px ;
                color: #333333;
            }
        }
      }
      .wj2{
        width: 100%;
        padding-top: 16px;
        display: flex;
        .wj12{
            width: 50%;
            font-size: 13px;
            color: #666;
            span{
                font-size: 15px ;
                color: #333333;
            }
        }
      }
     
    }
    .neirong{
        width: 500px;
        margin: 0 auto;
        text-align: center;
        margin-top: 40px;
        font-size: 20px ;
        color: #333333;
        font-weight: 600;
        line-height: 36px;
    }
    .neirong1{
        width: 1200px;
        margin: 20px auto;
        height: 1px;
        background-color: #d0d0d3;
       
    }
    .neirong2{
        width: 1200px;
        margin: 0px auto;
        display: flex;
        justify-content: space-around;
        font-size: 14px;
        color: #666;
        span{
            font-size: 14px;
            font-weight: 550;
            color: #333333;
            
        }
       
    }
    .fujian{
        display: flex;

        width: 1200px;
        margin: 0 auto;
        .fs1{
            width: 40px;
            font-size: 14px;
            font-weight: 550;
        }
        .fs2{
            width: calc(100% - 60px);
            padding-left: 20px;
            font-size: 14px;
            font-weight: 550;
            color: #911f23;
            cursor: pointer;
        }
       
    }
     .book2{
        width: calc(1400px - 0px);
        margin: 0px auto;
        border-radius: 8px 8px 8px 8px;
        opacity: 1;
        margin-top: 50px;
        background-color: #fff;
        border-radius: 8px;
        .book21{
            width: 1200px;
            margin:  0 auto;
            .title {
                width: 100%;
                display: flex;
                align-items: center;
                .xian {
                    width: 12px;
                    height: 24px;
                    background: #911f23;
                    border-radius: 0px 0px 0px 0px;
                    opacity: 1;
                }
                .wenzi {
                    margin-left: 12px;
                    font-size: 22px;
                    font-family: Source Han Sans CN-Medium, Source Han Sans CN;
                    font-weight: 500;
                    color: #3d3d3d;
                }
            }
            .book22{
                width: 100%;
                padding-top: 16px;
                font-size: 14px;
                font-family: Source Han Sans CN-Regular, Source Han Sans CN;
                font-weight: 400;
                color: #666666;
                line-height: 22px;
            }
        }
      }
  }
}
.foot {
  position: fixed;
  bottom: 0;
  left: 0;
}
</style>

<script>
import { getBookXq,getszda } from "@/api/api.js";
import usertbtn from "../../components/user/index.vue";
import footbtn from "../../components/foot/index.vue";
export default {
  data() {
    return {
      shujixq: {},

      formLogin: {
        name: "",
        // padd: "",
      },
      formInline: {
        user: "",
      },
      mc: "",
      id:0,
      lx:0,
      pcxqlist:{},
      fujianLists:[]
    };
  },
  created() {
    this.id = this.$route.query.id
    this.lx = this.$route.query.lx
    this.mc = sessionStorage.getItem("sousuo");
    
    this.bookxq();
  },
  mounted() {
    // this.creatQrCode();
  },
  methods: {
    xzfj(url){
        window.open(url, '_blank');
    },
    toshuj() {
      sessionStorage.setItem("erjsnav", 1);
      sessionStorage.setItem("sousuo", this.mc);
      this.$router.push({
        path: "/s2",
        query: {},
      });
    },

    async bookxq() {
      let res = await getszda({
        id: this.lx*1,
        type:this.id*1
      });
      
      this.pcxqlist = res;
      this.fujianLists =  res.fujianList?res.fujianList:[]


    },
    sousuos() {
      if (this.formInline.user == "") {
        this.$message.error({ message: "请输入搜索内容!", center: true });
      }
    },
    onSubmit() {
    //  sessionStorage.setItem("erjsnav", 1);
    sessionStorage.setItem("erjsnav", 0);
      this.$router.push({
        path: "/retrieval",
        query: {},
      });
    },
  },
  computed: {},
  components: {
    footbtn,
    usertbtn,
  },
};
</script>
